<?php

function getConn(){
  $con=mysqli_connect('localhost','root','123456','studentskill');
  mysqli_query($con, "set names 'UTF8'");
  mysqli_query($con, "set character set 'utf8'");
  if (mysqli_connect_errno($con)){
      echo "link MySQL err: " . mysqli_connect_error();
  }else{
    return $con;
  }
}
?>